<template>
	<view>
		<f-navbar title="收支明细" fontColor="#ffffff" bgColor="#ffa200" :scrollTop="scrollTop" navbarType='0'></f-navbar>
		<view class="flex">
			<view class="text-area">
				<input type="text" class="inputBox" placeholder="  请搜索你需要的服务">
			</view>
			<view>
				搜索
			</view>
		</view>
		<view class="father">
			<view :class="item.id===showTable?'sunactive':''" v-for="item in fileList" @click="toggleTable(item.id)">
				{{item.name}}
			</view>
		</view>
		<view>
			<view v-for="item in fileList">
				<view v-show="item.id===showTable">
					<view v-for="items in item.list">
						<view style="display: flex;align-items: center;justify-content: space-between;">
							<view style="display: flex;align-items: center;">
								<image :src="items.imgeurl" style="width: 70px;height: 70px;border-radius: 50%;padding: 10px 20px;"></image>
								<view>
									<view>{{items.name}}</view>
									<view style="color: red;">￥{{items.price}}元</view>
								</view>
							</view>
							<view style="margin-right: 15px;background-color: aqua;padding: 5px 10px;">
								{{items.str}}
							</view>
						</view>
						<view style="margin-left: 20px;">
							商品详情：{{items.details}}
						</view>
						<view style="margin-left: 20px;">
							产生时间：{{items.detailtime}}
						</view>

					</view>
				</view>

			</view>
			<view class="footer">
				<view class="sonfooter">
					<view>
						<view>今日收益</view>
						<view style="color: red;">￥1000元</view>
					</view>
					<view>
						<view>待分成收益</view>
						<view style="color: red;">￥1000元</view>
					</view>
					<view>
						<view>本月收益</view>
						<view style="color: red;">￥1000元</view>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				fileList: [{
						name: "今日消费",
						id: '23001',
						list: [{
							imgeurl: '../../static/other/111.jpg',
							name: '蜘蛛侠',
							price: 1499,
							str: "提成",
							details: '来自英雄无归里的蜘蛛man',
							detailtime: '2023-05-20 05:13:14'
						},
						{
							imgeurl: '../../static/other/111.jpg',
							name: '蜘蛛侠',
							price: 1499,
							str: "消费",
							details: '来自英雄无归里的蜘蛛man',
							detailtime: '2023-05-20 05:13:14'
						}]
					},
					{
						name: "全部",
						id: '23002'
					},
					{
						name: "提成",
						id: '23003'
					},
					{
						name: "待提成",
						id: '23004'
					},
					{
						name: "消费",
						id: '23005'
					},
				],

				showTable: "23001", // 默认显示表格

			}
		},
		methods: {
			toggleTable(ids) {
				console.log(ids);
				this.showTable = ids
			},

		}
	}
</script>

<style lang="scss">
	.father {
		display: flex;
		justify-content: space-around;
		align-items: center;

	}

	.father>view {
		padding: 5px;
		font-size: 30rpx;
		width: 100%;
		border: 1px solid $uni-color-warning;
		text-align: center;
	}

	.sunactive {
		background-color: red;
	}
	.inputBox {
	    
		height: 80rpx;
		background-color: #ececec;
		border-radius: 50rpx;
		margin: 20rpx auto;
		font-size: 26rpx;
	}
	
	.flex {
		display: flex;
		align-items: center;
		padding: 0 10px;
	}
	.text-area{
		flex: 1;
	}
	.footer{
		position: fixed;
		bottom: 0;
		left: 0;
	}
	.sonfooter{
		width: 750rpx;
		display: flex;
	 //    justify-content: space-around;
		// align-items: center;
		text-align: center;
	}
	.sonfooter>view{
		width: 33%;
		text-align: center;
			border: 1px solid $uni-color-warning;
	}
</style>